<template>
<onekit-page>
<onekit-view onekit-class="container">
	<div is="onekit-template-head" :DATA="`${JSON.stringify({title:'pageScrollTo'})}`"></div>
	<onekit-view onekit-class="page-body">
		<onekit-view onekit-class="page-section">
			<onekit-view onekit-class="btn-area">
				<onekit-button type="primary" @Tap="scrollToBottom">滚动到页面底部</onekit-button>
			</onekit-view>
			<onekit-view onekit-class="filling-area"></onekit-view>
			<onekit-view onekit-class="btn-area">
				<onekit-button type="primary" @Tap="scrollToTop">返回顶部</onekit-button>
			</onekit-view>
		</onekit-view>
	</onekit-view>
	<div is="onekit-template-foot"></div>
</onekit-view>
</onekit-page></template>
<script>
/* eslint-disable */
import Vue from 'vue';
import onekit_template_0 from '../../../common/head.head.vue';Vue.component('onekit-template-head',onekit_template_0);
import onekit_template_1 from '../../../common/foot.foot.vue';Vue.component('onekit-template-foot',onekit_template_1);
const ONEKIT_JSON= {
  "navigationBarTitleText": "页面滚动",
  "usingComponents": {
    
  }
};
const ONEKIT_SJS = {
};
import wx from '../../../../weixin2vue/wx.js';
import Macro from '../../../../weixin2vue/Macro.js';
const {getApp,getCurrentPages} = Macro;
import Page from '../../../../weixin2vue/OnekitPage.js';
import Component from '../../../../weixin2vue/OnekitComponent.js';
export default Page(ONEKIT_JSON,[],ONEKIT_SJS,{
    "onShareAppMessage"(){
      return {
        "title":'页面滚动',
        "path":'packageAPI/pages/page-scroll/page-scroll'
};
    },
    "scrollToTop"(){
      wx.pageScrollTo({
        "scrollTop":0,
        "duration":300
});
    },
    "scrollToBottom"(){
      wx.pageScrollTo({
        "scrollTop":3000,
        "duration":300
});
    }
});

</script>
<style 
 lang="css">
.rect {
  width: 50px ;
  height: 50px ;
  background-color: #ccc ;
}
.filling-area {
  height: 1250px ;
}
</style>